package com.meixiang.entity.shopping;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 商品类别
 *
 * @author LZRUI
 */
public class GoodsTypeEntity implements Parcelable {

    private String gcId; // 类别id
    private String gcName; // 类别名称
    private String gcCount; // 数量

    public String getGcId() {
        return gcId == null ? "" : gcId;
    }

    public void setGcId(String gcId) {
        this.gcId = gcId;
    }

    public String getGcName() {
        return gcName == null ? "" : gcName;
    }

    public void setGcName(String gcName) {
        this.gcName = gcName;
    }

    public String getGcCount() {
        return gcCount == null ? "0" : gcCount;
    }

    public void setGcCount(String gcCount) {
        this.gcCount = gcCount;
    }

    public GoodsTypeEntity() {

    }

    public GoodsTypeEntity(String gcId, String gcName, String gcCount) {
        this.gcId = gcId;
        this.gcName = gcName;
        this.gcCount = gcCount;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.gcId);
        dest.writeString(this.gcName);
        dest.writeString(this.gcCount);
    }

    protected GoodsTypeEntity(Parcel in) {
        this.gcId = in.readString();
        this.gcName = in.readString();
        this.gcCount = in.readString();
    }

    public static final Creator<GoodsTypeEntity> CREATOR = new Creator<GoodsTypeEntity>() {
        @Override
        public GoodsTypeEntity createFromParcel(Parcel source) {
            return new GoodsTypeEntity(source);
        }

        @Override
        public GoodsTypeEntity[] newArray(int size) {
            return new GoodsTypeEntity[size];
        }
    };
}
